<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                >

    <f:subview id="cadastroQuestaoBloquearEmbutido" rendered="#{fluxoExibicaoCadastro.exibirCadastroQuestaoBloqueio}">
        <h:panelGrid columns="1" id="embCadQuesBloq" width="850" styleClass="center">
            <h:form id="formTableQuestoes">
                <p:dataTable value="#{questaoBloqueioManager.questoesModel}" var="questao" id="tableQuestoes" rows="5" paginator="true"
                             paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks}
                             {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" styleClass="bvb-font" 
                             emptyMessage="#{msg.semRegistrosEcontrados}" rowsPerPageTemplate="5,10,15,20" >
                    <f:facet name="header">
                        <h:outputText value="#{msg.richTableQuestoes}"/>
                    </f:facet>

                    <p:column id="col1" styleClass="center" style="width: 65px;" filterBy="#{questao.id}" headerText="Model" footerText="contains"
                              filterMatchMode="contains">
                        <f:facet name="header">
                            <h:outputText value="#{msg.richColumnId}"/>
                        </f:facet>
                        <h:outputText value="#{questao.id}" styleClass="bvb-font"/>
                    </p:column>

                    <p:column id="col2" filterBy="#{questao.enunciado}" headerText="Model" footerText="contains"
                              filterMatchMode="contains">
                        <f:facet name="header">
                            <h:outputText value="#{msg.richColumnEnunciado}"/>
                        </f:facet>
                        <h:inputTextarea cols="25" rows="3" disabled="true" value="#{questao.enunciado}" style="font-size: 10px;"/>
                    </p:column>

                    <p:column id="col8" filterBy="#{questao.objetivoCertificacao}" headerText="Model" footerText="contains"
                              filterMatchMode="contains">
                        <f:facet name="header">
                            <h:outputText value="#{msg.richColumnObjetivo}" />
                        </f:facet>
                        <h:inputTextarea cols="25" rows="3" disabled="true" value="#{questao.objetivoCertificacao}" style="font-size: 10px;"/>
                    </p:column>

                    <p:column id="col10" styleClass="center" filterBy="#{questao.versoesString}" headerText="#{msg.richColumnVersoes}" 
                              filterMatchMode="contains" >
                        <f:facet name="header">
                            <h:outputText value="#{msg.richColumnVersoes}"/>
                        </f:facet>
                        <h:outputText value="#{questao.versoesString}" styleClass="bvb-font"/>
                    </p:column>

                    <p:column id="col11" styleClass="center" >
                        <f:facet name="header">
                            <h:outputText value="#{msg.richColumnContestacoes}"/>
                        </f:facet>
                        <h:outputText value="#{questao.contestacoes}" styleClass="bvb-font"/>
                    </p:column>

                    <p:column id="col9" styleClass="center" style="width: 65px;">
                        <f:facet name="header">
                            <h:outputText value="#{msg.richColumnStatus}"/>
                        </f:facet>
                        <h:panelGroup id="buttonGroup">
                            <p:commandLink update="conteudoCentralGroup,messages" actionListener="#{questaoBloqueioManager.alterarQuestao(questao)}"
                                           id="buttonBlockQ" styleClass="ui-button_link">
                                <h:graphicImage library="img" name="open_24.png" rendered="#{questao.statusQuestao}" title="#{msg.titleButtonPegaQuestaoVersaoBloq}"/>
                                <h:graphicImage library="img" name="lock_24.png" rendered="#{!questao.statusQuestao}" title="#{msg.titleButtonPegaQuestaoVersaoLibe}"/>
                            </p:commandLink>
                        </h:panelGroup>
                    </p:column>
                </p:dataTable>    
            </h:form>

        </h:panelGrid>

    </f:subview>
</ui:composition>